/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.jitag.dao.db4o;

import com.db4o.ext.ExtObjectContainer;

import sk.jp.jitag.dao.DataSource;

public class Db4oDataSource implements DataSource {

    private ExtObjectContainer dataSource;

    //----------------------------------------------------------------------

    public Db4oDataSource(ExtObjectContainer dataSource) {
        if(dataSource == null) throw new NullPointerException("Parameter dataSource is null");

        this.dataSource = dataSource;
    }

    //----------------------------------------------------------------------

    public Object getUnderlyingDataSource() {
        return dataSource;
    }

    public ExtObjectContainer getDb4oDataSource(){
        return (ExtObjectContainer) getUnderlyingDataSource();
    }

}
